<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>全球新冠病毒感染确诊数据统计</title>
    <link rel="stylesheet" href="http://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
          crossorigin="anonymous">
</head>
<style>
    body, table {
        margin: 0 auto;
        text-align: center;
    }

    th, td {
        text-align: center;
        width: 20%;
        background-color: antiquewhite;
    }

    head {
        background-color: crimson;
    }
</style>
<body>
    <div id="head">
        <center><h1>全球新冠病毒感染确诊数据统计</h1></center>
    </div>

    <table>
        <thead>
        <tr>
            <th> 总确诊人数</th>
            <th> 新增确诊人数</th>
            <th> 截止日期</th>
        </tr>
        </thead>
        <tbody>
        <p>
        <td th:text="${totalCase}"></td>
        <td th:text="${addTotal}"></td>
        <td><span th:text="${#temporals.format(time,'yyyy-MM-dd ')}"></span></p></td>
        </tr>
        </tbody>
        <thead>
        <tr>
            <th> 州/省</th>
            <th> 国家</th>
            <th> 总确诊人数</th>
            <th> 今日新增确诊人数</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="regionList : ${regionList}">
            <td th:text="${regionList.state}"></td>
            <td th:text="${regionList.country}"></td>
            <td th:text="${regionList.latestTotalCases}"></td>
            <td th:text="${regionList.difFromPrevDay}"></td>
        </tr>
        </tbody>
    </table>
</body>
</html>